/*
** my_putnbr_base.c for galaf in /home/compilation/galaf-lib
** 
** Made by christophe labonnemartinez
** Login   <labonn_c@epitech.net>
** 
** Started on  Fri Mar 23 04:41:09 2012 christophe labonnemartinez
** Last update Sat Aug 11 12:36:32 2012 christophe labonnemartinez
*/

#include "includes/my.h"

int	my_putnbr_base(int n, char *base)
{
  int	b_len;

  if (n < 0)
    {
      my_putchar('-');
      n = -n;
    }
  b_len = my_strlen(base);
  if (n > (b_len - 1))
    my_putnbr_base(n / b_len, base);
  return (my_putchar(base[n % b_len]));
}
